@extends('admin::layouts.master')
@section('title') 审核列表 @endsection
@section('tab')
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body" style="border-bottom: none;">
                        <form class="layui-form layui-col-space5">
                            <div class="layui-input-inline layui-show-xs-block" style="width: 300px;">
                                <input type="text" name="name" placeholder="名称" value="{{$arr_search['name']}}"
                                       autocomplete="off" class="layui-input">
                            </div>

                            <div class="layui-input-inline layui-show-xs-block" style="width: 150px;">
                                <select name="cate">
                                    <option value="">类型</option>
                                    <option value="1" @if($arr_search['cate']==1) selected @endif>检测站</option>
                                    <option value="2" @if($arr_search['cate']==2) selected @endif>维修店</option>
                                </select>
                            </div>

                            <div class="layui-input-inline layui-show-xs-block" style="width: 150px;">
                                <select name="status">
                                    <option value="">状态</option>
                                    <option value="1" @if($arr_search['status']==1) selected @endif>待审核</option>
                                    <option value="2" @if($arr_search['status']==2) selected @endif>审核通过</option>
                                    <option value="3" @if($arr_search['status']==3) selected @endif>驳回申请</option>
                                </select>
                            </div>

                            <div class="layui-input-inline layui-show-xs-block">
                                <button class="layui-btn" lay-submit="" lay-filter="sreach">
                                    <i class="layui-icon">&#xe615;</i>
                                </button>
                                <button class="layui-btn" onclick="location.reload()">
                                    <i class="layui-icon layui-icon-refresh"></i>
                                </button>
                            </div>
                        </form>
                    </div>
                    <div class="layui-card-body layui_overflow_y ">
                        <table class="layui-table layui-form">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>店铺名称</th>
                                <th>公司名称</th>
                                <th>老板名称</th>
                                <th>老板电话</th>
                                <th>类型</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>

                            @foreach($data as $key=>$value)
                                <tr>
                                    <td>{{$value['id']}}</td>
                                    <td>{{$value['shop_info']['name']}}</td>
                                    <td>{{$value['shop_info']['company_name']}}</td>
                                    <td>{{$value['shop_info']['phone']}}</td>
                                    <td>{{$value['shop_info']['name_boss']}}</td>
                                    <td>
                                        @if($value['shop_info']['cate'] == 2) 维修店 @else 检测站 @endif
                                    </td>
                                    <td>{{$value['status']['name']}}</td>
                                    <td class="td-manage">
                                        <a title="详情" onclick="xadmin.open('详情','{{route("admin-shop-modify-detail",["id"=>$value["id"]])}}')" href="javascript:;">
                                            <i class="layui-icon">查看详情</i>
                                        </a>
                                    </td>
                                </tr>
                            @endforeach
                            @if(empty($data))
                                <td colspan="66" align="center">暂无数据</td>
                            @endif
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-card-body ">
                        <div class="page">
                            {{$page_link}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection


@section('tab_js')
    <script>

    </script>
@endsection




